package com.sp.scmdb.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.sp.scmdb.common.DomainObject;

@Entity
@Table(name = "OBJ_EMP_AREA")
public class RelEmpArea extends DomainObject {

	/** 人员ID */
	@Column(name = "idEmp")
	private int idEmp;
	
	/** 区域ID */
	@Column(name = "idArea")
	private int idArea;
	
	/** 进入区域的开始时间 */
	@Column(name = "startTime")
	private String startTime;
	
	/** 进入区域的结束时间 */
	@Column(name = "endTime")
	private String endTime;
	
	/** 是否跨天标示：0 跨天；1 不跨天 */
	@Column(name="dayFlag")
	private String dayFlag;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "idArea", insertable = false, updatable = false)
	private Area area;

	public Area getArea() {
		return area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	public String getDayFlag() {
		return dayFlag;
	}

	public void setDayFlag(String dayFlag) {
		this.dayFlag = dayFlag;
	}

	public int getIdEmp() {
		return idEmp;
	}

	public void setIdEmp(int idEmp) {
		this.idEmp = idEmp;
	}

	public int getIdArea() {
		return idArea;
	}

	public void setIdArea(int idArea) {
		this.idArea = idArea;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}	
}
